<link rel="stylesheet" href="${request.contextPath}/component/flow/css/flowComponent.css">
<input type="hidden" value="" id="selectedId"/>
<div class="row panal-row">
	<div class="col-md-4 panal-col">
		<div class="title">采样点</div>
		<div style="overflow: auto; height: 280px;padding-top:1px;">
			<div class="suredy-tree department"></div>
		</div>
	</div>

	<div class="col-md-8 panal-col">
		<div class="title"> 选择结果</div>
		<div style="overflow: auto; height: 280px;">
			<table class="table table-bordered table-hover table-striped table-condensed">
				<tbody  id="selectedNode" ></tbody>
			</table>
		</div>
	</div>
</div>
<script src="${request.contextPath}/js/suredy-tree.js"></script>
<script>
	$(function() {
		var s_id = "${selectedId}";
		var treeData = ${treeData};
		var isMulti = true;
		$('.suredy-tree').tree(treeData,
		{
			checkbox : isMulti,
			onlyLeafCheckbox:true,
			click : function() {
				if (isMulti) {
					$('#selectedNode').html('');
					$.suredy.tree.checked($('.suredy-tree')).each(function(index) {
						var u=$.suredy.tree.data($(this));
							$('#selectedNode').append('<tr class="text-center nodeRow" data-id="'+u+'" data-text="'+this.text+'"><td>' + this.text + '</td></tr>');
					});
				} 
			}
		});
	});
</script>